package po;

import com.mchange.v2.c3p0.ComboPooledDataSource;
import javax.sql.DataSource;

/**
 * Create By IntelliJ IDEA
 *
 * @Author: jsonor
 * @Create-Time: 2017/10/17 8:23
 * @Description: 连接池管理类
 */
public class DataSourceFactory {

  private final static DataSource Instance;

  static {
    Instance = new ComboPooledDataSource();
  }

  /**
   * 获取一个DataSource, c3p0连接池管理
   *
   * @return DataSource的接口
   */
  public static DataSource getDataSource() {
    return Instance;
  }
}
